<{include file="../common/header.tpl"}>
<table width="100%" border="0" cellspacing="0">
 <tr>
       <td width="13%" valign="top">
           <{include file="../common/left.tpl"}>
       </td>
       <td width="87%" valign="top">

               <table width="100%" border="0" cellspacing="0">
                 <tr>
                       <td>
                        <div class="subnav">
                          <div class="content-menu ib-a blue line-x"> 
                                <a href="/webadmin/network/list"><em>网点信息管理</em></a><span>|</span>
                                <a href="javascript:;" class="on"><em><{if $info}>编辑网点<{else}>添加网点<{/if}></em></a>
                           <div class="clearbox"></div>
                          </div>
                        </div>
                           
                            <div class="pad_10">
                              <div class="table-list">
                                    <div class="common-form">
                                        <form name="myform" action="<{if $info}>/webadmin/network/doEdit<{else}>/webadmin/network/doAdd<{/if}>" method="post" id="myform">
                                        <table width="100%" class="table_form contentWrap">
                                        <tbody>
                                        <tr>
                                            <td width="80">网点编号</td> 
                                            <td>
                                                <input type="text" name="network_num" value="<{$info.network_num}>" class="input-text" id="network_num">
                                                <input type="hidden" name="checknetwork" value="0" id="checknetwork" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="80">网点名称</td> 
                                            <td><input type="text" name="network_name" value="<{$info.network_name}>" class="input-text" id="network_name"></td>
                                        </tr>
                                        <tr>
 
                                        <tr>
                                        <td>网点所属银行</td> 
                                        <td>
                                            <select name="bank_id"  class="w158">
                                                <{foreach $banklist as $key => $val}>
                                                <option value="<{$key}>" <{if $info.bank_id==$key||$bank_id==$key}>selected="selected"<{/if}>><{$val}></option>
                                                 <{/foreach}>
                                          </select>
                                        </td>
                                        </tr>
                                        <tr>
                                            <td width="80">登录昵称</td> 
                                            <td><input type="text" name="network_username" value="<{$info.network_username}>" class="input-text" id="network_username"></td>
                                        </tr>
                                        <tr>
                                            <td width="80">登录密码</td> 
                                            <td>
                                                <input type="text" name="network_pwd" value="<{$info.network_pwd}>" class="input-text" id="network_pwd">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="80">网点级别</td>
                                            <td>
                                                <select name="level">
                                                    <{foreach $alllevel as $key => $val}>
                                                        <option <{if $info.level==$key||$next_level==$key}>selected="selected"<{/if}> value="<{$key}>"><{$val.desc}></option>
                                                    <{/foreach}>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="80">网点权限级别</td>
                                            <td>
                                                <select name="auth_grade">
                                                    <{foreach $alllevel as $key => $val}>
                                                        <option <{if $info.auth_grade==$key||$next_level==$key}>selected="selected"<{/if}> value="<{$key}>"><{$val.desc}></option>
                                                    <{/foreach}>
                                                </select>
                                            </td>
                                        </tr>
                                        </tbody>
                                        </table>
	
                                        <div class="bk15"></div>
                                        <input name="up_network_id" type="hidden" value="<{$up_network_id}>"/>
                                        <{if $info}><input type="hidden" name="network_id" value="<{$info.network_id}>"/><{/if}>
                                        <input name="dosubmit" type="submit" value="提交" class="button">
                                        </form>
                                        </div>
                              </div>
                            </div>

                       </td>
                 </tr>
               </table>
       </td>
 </tr>
</table>
<script type="text/javascript">
$(document).ready(function() {     
    var options = {         
        beforeSubmit:  showRequest,  
        success:       showResponse,
        dataType:  'json'
    }
    $('#myForm1').ajaxForm(options); 
    //判断编码是否唯一
    /*$('#network_num').blur(function(){
        var network_num = $(this).val();
        if (network_num) {
            $.getJSON('/webadmin/network/checknetwork',{network_num:network_num},function(res){
                if (res.status==0) {
                    alert(res.note);
                } else {
                    $('#checknetwork').val(1);
                }
            });
        }
    });*/
});
function showRequest(formData, jqForm, options) { 
    var checknetwork = $('#checknetwork').val();
    if (checknetwork ==0) {
        alert('请检查编号是否唯一');
        return false;
    }
    return true;
}
function showResponse(responseText, statusText, xhr, $form)  { 
    alert(responseText.note);
}

</script>
<{include file="../common/footer.tpl"}>